home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / newsgroups / misc.20031118-20041115 / 000089_slash_dev_slas…_2000@yahoo.com_Wed Jan 28 11:22:57 2004.msg < prev    next >
Internet Message Format  |  2004-11-14  |  3KB

  1. Path: newsmaster.cc.columbia.edu!panix!news.maxwell.syr.edu!postnews1.google.com!not-for-mail
  2. From: slash_dev_slash_null_2000@yahoo.com (Mark Sapiro)
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: Help with a script
  5. Date: 27 Jan 2004 21:57:46 -0800
  6. Organization: http://groups.google.com
  7. Lines: 47
  8. Message-ID: <deb126db.0401272157.32647b1b@posting.google.com>
  9. References: <6b84683a.0401271212.4059fe85@posting.google.com>
  10. NNTP-Posting-Host: 209.182.169.133
  11. Content-Type: text/plain; charset=ISO-8859-1
  12. Content-Transfer-Encoding: 8bit
  13. X-Trace: posting.google.com 1075269466 1157 127.0.0.1 (28 Jan 2004 05:57:46 GMT)
  14. X-Complaints-To: groups-abuse@google.com
  15. NNTP-Posting-Date: Wed, 28 Jan 2004 05:57:46 +0000 (UTC)
  16. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14789
  17.  
  18. ebh@burntmail.com (EBH) wrote in message news:<6b84683a.0401271212.4059fe85@posting.google.com>...
  19. > From what I currently know, I understand that after successfully
  20. > logging in, I can issue the "connect" command which will transfer
  21. > control from the script to the user. I need to know how to pick it up
  22. > again when required by a screen prompt (Iniitate you KERMIT, or
  23. > whatever). And as mentioned above I still to know when the remote
  24. > system disconnects so that I can end execution of the script.
  25.  
  26. If it's acceptable for the remote host to tell the user what to do, it
  27. can tell the user to escape back to command mode by typing the Kermit
  28. connect mode escape character followed by "c".  You don't say what
  29. Kermit the user will be using, but if it is Kermit-95, the user can
  30. also normally return to command mode with Alt-x, but this can be
  31. changed by assigning the \Kexit verb to a different key.
  32.  
  33. The connect mode escape character can be set with the command 
  34.    set escape-character
  35. (help set escape-character for more info).  The default escape
  36. character in C-Kermit is control-\  in Kermit-95 it's control-]
  37.  
  38. When the user escapes back to command mode, the script will pick up
  39. with the command following the connect.
  40.  
  41. You might also be able to use Kermit's autodownload/autoupload
  42. features to bypass the user's need to escape to command mode.  In this
  43. case, if the remote host attemps to "send" or "get" a file to/from the
  44. local Kermit, the local Kermit will switch from connect mode to server
  45. mode automatically to receive/send the file(s).
  46.  
  47. There are various ways to tell if the remote disconnects if the script
  48. is executing.  You should always test all commands for success or
  49. failure anyway, and any command that communicates with the host will
  50. fail if the connection is gone.  Also, you can explicitly use the
  51. condition "open connection" as in
  52.   if open connection ...
  53.   while open connection ...
  54. to test the connection in the script.
  55.  
  56. Normally if a disconnect occurs in conect mode, Kermit returns to
  57. command mode (to the script in your case) so you could test for this
  58. with something like
  59.   connect
  60.   if not open connection exit   ; or end as appropriate
  61.  
  62. --
  63. Mark Sapiro msapiro -at- value net    The highway is for gamblers,
  64. San Francisco Bay Area, California    better use your sense - B. Dylan
  65.